package com.example.controller;

import com.example.model.BussinessException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class TestAdvice {

    @RequestMapping("testException")
    public String testException() throws Exception{
        throw new MissingServletRequestParameterException("name","String");
    }

    @RequestMapping("testBussinessException")
    public String testMyException() throws BussinessException {
        throw new BussinessException("抛出了BussinessException");
    }
}
